﻿namespace SLClient.ServiceAPI
{
    using System;
    using System.CodeDom.Compiler;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Runtime.Serialization;
    using System.Threading;

    [GeneratedCode("System.Runtime.Serialization", "4.0.0.0"), DebuggerStepThrough, DataContract(Name="Announment", Namespace="http://schemas.datacontract.org/2004/07/SLClient")]
    public class Announment : INotifyPropertyChanged
    {
        private string AnnounContentField;
        private DateTime? AnnounDateField;
        private int AnnounIdField;
        private string AnnounTitleField;
        private int? AnnounTypeField;
        private PropertyChangedEventHandler _PropertyChanged;

        public event PropertyChangedEventHandler PropertyChanged
        {
            add
            {
                PropertyChangedEventHandler handler2;
                PropertyChangedEventHandler propertyChanged = this._PropertyChanged;
                do
                {
                    handler2 = propertyChanged;
                    PropertyChangedEventHandler handler3 = (PropertyChangedEventHandler) Delegate.Combine(handler2, value);
                    propertyChanged = Interlocked.CompareExchange<PropertyChangedEventHandler>(ref this._PropertyChanged, handler3, handler2);
                }
                while (propertyChanged != handler2);
            }
            remove
            {
                PropertyChangedEventHandler handler2;
                PropertyChangedEventHandler propertyChanged = this._PropertyChanged;
                do
                {
                    handler2 = propertyChanged;
                    PropertyChangedEventHandler handler3 = (PropertyChangedEventHandler) Delegate.Remove(handler2, value);
                    propertyChanged = Interlocked.CompareExchange<PropertyChangedEventHandler>(ref this._PropertyChanged, handler3, handler2);
                }
                while (propertyChanged != handler2);
            }
        }

        protected void RaisePropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler propertyChanged = this._PropertyChanged;
            if (propertyChanged != null)
            {
                propertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        [DataMember(Order=3)]
        public string AnnounContent
        {
            get
            {
                return this.AnnounContentField;
            }
            set
            {
                if (!object.ReferenceEquals(this.AnnounContentField, value))
                {
                    this.AnnounContentField = value;
                    this.RaisePropertyChanged("AnnounContent");
                }
            }
        }

        [DataMember(Order=4)]
        public DateTime? AnnounDate
        {
            get
            {
                return this.AnnounDateField;
            }
            set
            {
                if (!this.AnnounDateField.Equals(value))
                {
                    this.AnnounDateField = value;
                    this.RaisePropertyChanged("AnnounDate");
                }
            }
        }

        [DataMember]
        public int AnnounId
        {
            get
            {
                return this.AnnounIdField;
            }
            set
            {
                if (!this.AnnounIdField.Equals(value))
                {
                    this.AnnounIdField = value;
                    this.RaisePropertyChanged("AnnounId");
                }
            }
        }

        [DataMember(Order=2)]
        public string AnnounTitle
        {
            get
            {
                return this.AnnounTitleField;
            }
            set
            {
                if (!object.ReferenceEquals(this.AnnounTitleField, value))
                {
                    this.AnnounTitleField = value;
                    this.RaisePropertyChanged("AnnounTitle");
                }
            }
        }

        [DataMember]
        public int? AnnounType
        {
            get
            {
                return this.AnnounTypeField;
            }
            set
            {
                if (!this.AnnounTypeField.Equals(value))
                {
                    this.AnnounTypeField = value;
                    this.RaisePropertyChanged("AnnounType");
                }
            }
        }
    }
}

